#!/usr/bin/python
# coding=utf-8

from flask import Flask, request, Blueprint
from flask_restplus import Api, Resource, fields
from flask_restplus._http import HTTPStatus
from werkzeug.middleware.proxy_fix import ProxyFix


def create_app(p_config_obj=None):
    """

    """

    app = Flask(__name__)
    app.config.from_object(p_config_obj)
    app.wsgi_app = ProxyFix(app.wsgi_app)

    #blueprint = Blueprint('api', __name__)
    #api = Api(blueprint, title="Template API", version="v1.0.1", description="A simple template API", doc="/swagger/doc")

    api = Api(app, version='1.0', title='Template API', description='A simple template API', )

    return app, api
